package com.xbk.seckill.order.infrastructure.mapper;

import com.xbk.seckill.order.domain.model.entity.SeckillOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单
 *
 * @author xiexu
 * @date 2025/4/20 09:43
 */
public interface SeckillGoodsOrderMapper {

    /**
     * 保存订单
     * 
     * @param seckillOrder 订单
     * @return 是否保存成功
     */
    int saveSeckillOrder(SeckillOrder seckillOrder);

    /**
     * 根据商品id获取订单列表
     * 
     * @param goodsId 商品id
     * @return 订单列表
     */
    List<SeckillOrder> getSeckillOrderByGoodsId(@Param("goodsId") Long goodsId);

    /**
     * 删除订单数据
     * 
     * @param goodsId 商品id
     * @param orderId 订单id
     */
    void deleteOrder(@Param("goodsId") Long goodsId, @Param("orderId") Long orderId);

}
